﻿<%@ Page Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="True" CodeBehind="ESS_ProjectOperation.aspx.cs" Inherits="KPIS.GERP.ESS.APP.App_UI.Forms.ESS_ProjectOperation" %>

<%@ Register src="../Controls/DatePicker.ascx" tagname="DatePicker" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <title>รายการอนุมัติดำเนินงาน</title>
    
    <link href= "../Styles/CssClass.css" rel="cssclass" type="text/css" />
    <link href= "../Styles/StyleSheet.css" rel="stylesheet" type="text/css" /> 
    <script language="JavaScript" src="../Scripts/Common.js" type="text/jscript"></script>
    <script language="JavaScript" src="../Scripts/DatePicker.js" type="text/jscript"></script>
    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <telerik:RadAjaxManagerProxy ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
        
            <telerik:AjaxSetting AjaxControlID="tabUpdate">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="tabUpdate" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="PanelBody" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="PanelProgress" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            
            <telerik:AjaxSetting AjaxControlID="PanelBody">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="PanelBody" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        
            <telerik:AjaxSetting AjaxControlID="PanelProgress">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="PanelBody" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <%--<telerik:AjaxSetting AjaxControlID="PanelMessageSend">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="PanelMessageSend" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>--%>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" IsSticky="true"
        BackgroundPosition="none" CssClass="LoadingPanel">
        <div>
            <table>
                <tr>
                    <td style="color: #666666; font-size: medium; font-weight: bold;" align="right" valign="bottom">
                        กรุณารอสักครู่...
                        <asp:Image id="Image1" runat="server" ImageUrl="../Images/PageViews/loading.gif" />
                    </td>
                </tr>
            </table>
        </div>
    </telerik:RadAjaxLoadingPanel>
    
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function OpenReportWindow() {
                var RadWindow = $find("<%= RadWindowReport.ClientID %>");
                
                radopen("ViewReport.aspx?name=ProjectOperation", "RadWindowReport");
            }

            function UpdateItemCountField(sender, args) {
                //set the footer text
                sender.get_dropDownElement().lastChild.innerHTML = "ทั้งหมด " + sender.get_items().get_count() + " รายการ";
            }
        </script>
    </telerik:RadCodeBlock>

    <table width="1000px" cellpadding="0" cellspacing="0" class="AllBorder">
        <tr>
            <td width="150px">
                <asp:Panel ID="PanelPage" runat="server" CssClass="PanelPage">
                    <asp:Label ID="lblPage" runat="server" Text="ขออนุมัติดำเนินงาน" CssClass="LabelMode" />
                </asp:Panel>
            </td>
            <td>
                <asp:Panel ID="PanelControl" runat="server" CssClass="PanelControl">
                    <div class="DivControl">
                        <table id="tabUpdate" runat="server" cellpadding="0" cellspacing="0">
                            <tr>
                                <td width="120px" class="controls">
                                    <asp:Label ID="lblMode" runat="server" Visible="false" />
                                    <asp:Label ID="lblModeName" runat="server" CssClass="LabelMode" />
                                </td>
                                <td>
                                    <asp:LinkButton ID="cmdAddNew1" runat="server" CssClass="LinkButtonControlWhite" onclick="cmdAddNew1_Click">
                                        <img alt="" id="imgAddNew" runat="server" height="14" src="~/App_UI/Images/Buttons/AddRecord.gif" /> เพิ่มข้อมูลใหม่
                                    </asp:LinkButton>
                                    <asp:LinkButton ID="cmdInsert1" runat="server" CssClass="LinkButtonControlWhite" onclick="cmdInsert1_Click" OnClientClick="javascript: return confirm('ต้องการบันทึกรายการนี้หรือไม่?');">
                                        <img alt="" id="imgInsert" runat="server" height="14" src="~/App_UI/Images/Buttons/saveDisk.gif" /> บันทึกข้อมูล
                                    </asp:LinkButton>
                                    <asp:LinkButton ID="cmdUpdate1" runat="server" CssClass="LinkButtonControlWhite" onclick="cmdUpdate1_Click" OnClientClick="javascript: return confirm('ต้องการบันทึกรายการนี้หรือไม่?');">
                                        <img alt="" id="imgUpdate" runat="server" height="14" src="~/App_UI/Images/Buttons/saveDisk.gif" /> บันทึกข้อมูล
                                    </asp:LinkButton>
                                <%--</td>
                                <td>--%>
                                    <asp:LinkButton ID="cmdEdit1" runat="server" CssClass="LinkButtonControlWhite" onclick="cmdEdit1_Click">
                                        <img alt="" id="imgEdit" runat="server" height="14" src="~/App_UI/Images/Buttons/Edit.gif" /> แก้ไขข้อมูล
                                    </asp:LinkButton>
                                    <asp:LinkButton ID="cmdCancel" runat="server" CssClass="LinkButtonControlWhite" onclick="cmdCancel_Click">
                                        <img alt="" id="img2" runat="server" height="14" src="~/App_UI/Images/Buttons/Cancel.gif" /> ยกเลิกการแก้ไข
                                    </asp:LinkButton>
                                <%--</td>
                                <td>--%>
                                    <asp:LinkButton ID="cmdDelete1" runat="server" CssClass="LinkButtonControlWhite" onclick="cmdDelete1_Click"
                                        OnClientClick="javascript: return confirm('ต้องการลบรายการนี้หรือไม่?');">
                                        <img alt="" id="imgDelete" runat="server" height="14" src="~/App_UI/Images/Buttons/Delete.gif" /> ลบรายการที่เลือก
                                    </asp:LinkButton>
                                    <asp:LinkButton ID="cmdSendMessage1" runat="server" CssClass="LinkButtonControlWhite" onclick="cmdSendMessage1_Click"><%--OnClick="return false;"--%>
                                        <img alt="" id="img4" runat="server" height="14" src="~/App_UI/Images/Buttons/Send.gif" /> ส่งให้ผู้บังคับบัญชาพิจารณา
                                    </asp:LinkButton>
                                    <asp:LinkButton ID="cmdCancelMessage" runat="server" CssClass="LinkButtonControlWhite" onclick="cmdCancelMessage_Click"
                                        OnClientClick="javascript: return confirm('ต้องกายกเลิกการส่งให้ผู้บังคับบัญชาพิจารณาหรือไม่?');">
                                        <img alt="" id="img7" runat="server" height="14" src="~/App_UI/Images/Buttons/Back.png" /> ยกเลิกการส่งให้ผู้บังคับบัญชาพิจารณา
                                    </asp:LinkButton>
                                    <asp:LinkButton ID="cmdReport" runat="server" CssClass="LinkButtonControlWhite" OnClientClick="OpenReportWindow()"><%--OnClick="return false;"--%>
                                        <img alt="" id="imgReport" runat="server" src="~/App_UI/Images/Buttons/Print1.gif" height="15" /> รายงานอนุมัติดำเนินงาน
                                    </asp:LinkButton>
                                </td>
                            </tr>
                        </table>
                    </div>
                </asp:Panel>
            </td>
        </tr>
        <tr>
            <td width="150px" valign="top">
                <asp:Panel ID="PanelProgress" runat="server" CssClass="PanelProgress">
                    <div class="DivProgress">
                        <ul class="ProgressList">
                            <li id="li1" runat="server">
                                <table>
                                    <tr>
                                        <td width="16px" align="center">
                                            <asp:Image ID="imgComplete1" runat="server" ImageUrl="~/App_UI/Images/Buttons/Update.gif" />
                                            <asp:Image ID="imgInComplete1" runat="server" ImageUrl="~/App_UI/Images/Buttons/Cancel.gif" />
                                        </td>
                                        <td>
                                            <asp:LinkButton ID="cmdProgress1" runat="server" CssClass="LinkButton" onclick="cmdProgress1_Click">ข้อมูลขออนุมัติดำเนินงาน</asp:LinkButton>
                                        </td>
                                    </tr>
                                </table>
                            </li>
                            <li id="li2" runat="server">
                                <table>
                                    <tr>
                                        <td width="16px" align="center">
                                            <asp:Image ID="imgComplete2" runat="server" ImageUrl="~/App_UI/Images/Buttons/Update.gif" />
                                            <asp:Image ID="imgInComplete2" runat="server" ImageUrl="~/App_UI/Images/Buttons/Cancel.gif" />
                                        </td>
                                        <td>
                                            <asp:LinkButton ID="cmdProgress2" runat="server" CssClass="LinkButton" onclick="cmdProgress2_Click">ข้อมูลค่าใช้จ่าย</asp:LinkButton>
                                        </td>
                                    </tr>
                                </table>
                            </li>
                            <li id="li3" runat="server">
                                <table>
                                    <tr>
                                        <td width="16px" align="center">
                                            <asp:Image ID="imgComplete3" runat="server" ImageUrl="~/App_UI/Images/Buttons/Update.gif" />
                                            <asp:Image ID="imgInComplete3" runat="server" ImageUrl="~/App_UI/Images/Buttons/Cancel.gif" />
                                        </td>
                                        <td>
                                            <asp:LinkButton ID="cmdProgress3" runat="server" CssClass="LinkButton" onclick="cmdProgress3_Click">ข้อมูลผู้ดำเนินโครงการ</asp:LinkButton>
                                        </td>
                                    </tr>
                                </table>
                            </li>
                        </ul>
                    </div>
                    <div class="DivProgress">
                        <ul class="ProgressList" >
                            <li id="liSummary" runat="server">
                                <table>
                                    <tr>
                                        <td width="16px">
                                        </td>
                                        <td>
                                            <asp:LinkButton ID="cmdSummary" runat="server" CssClass="LinkButton" onclick="cmdSummary_Click">สรุปรายการ</asp:LinkButton>
                                        </td>
                                    </tr>
                                </table>
                            </li>
                            <li id="liViewAll" runat="server">
                                <table>
                                    <tr>
                                        <td width="16px">
                                        </td>
                                        <td>
                                            <asp:LinkButton ID="cmdViewAll" runat="server" CssClass="LinkButton" onclick="cmdViewAll_Click">แสดงทั้งหมด</asp:LinkButton>
                                        </td>
                                    </tr>
                                </table>
                            </li>
                        </ul>
                    </div>
                </asp:Panel>
                <div class="DivProgress">
                    <table>
                        <tr>
                            <td width="16px">
                            </td>
                            <td>
                                <asp:LinkButton ID="cmdExportToMsWord" runat="server" CssClass="LinkButton" OnClick="cmdExportToMsWord_Click">
                                    <img id="Img1" alt="" runat="server" src="../Images/Buttons/MSWord2010Icons.png" height="20" />
                                    Export to Word
                                </asp:LinkButton>
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
            <td>
                <asp:Panel ID="PanelBody" runat="server" CssClass="PanelBody" Height="100%" ScrollBars="Auto">
                    <asp:Panel ID="PanelProgress1" runat="server">
                        <div class="DivInfo">
                            <table>
                                <tr>
                                    <td width="150px" align="right">
                                        หน่วยงานที่สังกัด :
                                    </td>
                                    <td width="250px">
                                        <asp:Label ID="lblBgmProjOperSeq" runat="server" Visible="false" />
                                        <asp:Label ID="lblRecordStatus" runat="server" Visible="false" />
                                        <asp:Label ID="lblWorkingJobSiteSeq" runat="server" Visible="false" />
                                        <asp:Label ID="lblWorkingJobSiteName" runat="server" ForeColor="Blue" />
                                    </td>
                                    <td width="100px" align="right">
                                        วันที่ทำรายการ :
                                    </td>
                                    <td>
                                        <asp:Label ID="lblBgmProjOperDate" runat="server" ForeColor="Blue" />
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div class="DivBody">
                            <table>
                                <tr>
                                    <td width="150px" align="right">
                                        ปีงบประมาณ :
                                    </td>
                                    <td >
                                        <telerik:RadNumericTextBox ID="txtBgmYear" runat="server"
                                            Width="100px" ShowSpinButtons="True" AutoPostBack="true" 
                                            NumberFormat-DecimalDigits="0" NumberFormat-GroupSeparator=""
                                            OnTextChanged="txtBgmYear_TextChanged" />
                                    </td>
                                </tr>
                            </table>
                            <table>
                                <tr>
                                    <td width="150px" align="right">
                                        รหัสขออนุมัติดำเนินงาน :
                                    </td>
                                    <td >
                                        <asp:Label ID="lblBgmProjOperCode" runat="server" ForeColor="Blue"></asp:Label>
                                    </td>
                                </tr>
                            </table>
                            <table>
                                <tr>
                                    <td width="150px" align="right">
                                        งาน/โครงการ :
                                    </td>
                                    <td>
                                        <telerik:RadComboBox ID="ddlBgmProjSeq" Runat="server" 
                                            DataTextField="bgm_proj_name" DataValueField="bgm_proj_seq"
                                            Filter="Contains" Width="600px" AutoPostBack="true"
                                            OnSelectedIndexChanged="ddlBgmProjSeq_SelectedIndexChanged">
                                        </telerik:RadComboBox>
                                        <span class="span">&nbsp;*</span>
                                    </td>
                                </tr>
                            </table>
                            <table>
                                <tr>
                                    <td align="right" width="150px" valign="top" class="valignTop">
                                        โครงการบูรณาการ :
                                    </td>
                                    <td>
                                        <table>
                                            <asp:Repeater ID="Repeater1" runat="server">
                                                <HeaderTemplate>
                                                </HeaderTemplate>
                                                <ItemTemplate>
                                                    <tr>
                                                        <td align="left" style="color: #0000FF">- <%# Eval("bgm_option_name")%></td>
                                                    </tr>
                                                </ItemTemplate>
                                            </asp:Repeater>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                            <table>
                                <tr>
                                    <td align="right" width="150px" valign="top" class="valignTop">
                                        ชื่อรายการ :
                                    </td>
                                    <td>
                                        <telerik:RadTextBox ID="txtBgmProjOperName" runat="server"
                                            Width="600px" Height="50px" TextMode="MultiLine" />
                                        <span class="span">&nbsp;*</span>
                                    </td>
                                </tr>
                            </table>
                            <table>
                                <tr>
                                    <td width="150px" align="right">
                                        วันที่เริ่มกิจกรรม :
                                    </td>
                                    <td width="250px">
                                        <uc1:DatePicker ID="dpStartDate" runat="server" />
                                    </td>
                                    <td width="100px" align="right">
                                        วันที่สิ้นสุดกิจกรรม :
                                    </td>
                                    <td>
                                        <uc1:DatePicker ID="dpEndDate" runat="server" />
                                    </td>
                                </tr>
                            </table>
                            <table>
                                <tr>
                                    <td align="right" width="150px">
                                        จำนวนผู้เข้าร่วมกิจกรรม :
                                    </td>
                                    <td>
                                        <telerik:RadNumericTextBox ID="txtAttendCount" runat="server">
                                            <NumberFormat DecimalDigits="0" />
                                        </telerik:RadNumericTextBox>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </asp:Panel>
                    <asp:Panel ID="PanelProgress2" runat="server">
                        <div class="DivInfo">
                            <table width="830px">
                                <tr>
                                    <td width="150px" align="right">
                                        งาน/โครงการ :
                                    </td>
                                    <td>
                                        <asp:Label ID="lblBgmProjName" runat="server" ForeColor="Blue" />
                                    </td>
                                    <td width="170px" align="right">
                                        <asp:LinkButton ID="cmdOpenExpenseSummary" runat="server" CssClass="LinkButton" onclick="cmdOpenExpenseSummary_Click">
                                            ดูสรุปค่าใช้จ่ายของงาน/โครงการ >>
                                        </asp:LinkButton>
                                    </td>
                                </tr>
                            </table>
                            <asp:Panel ID="PanelExpenseSummary" runat="server" CssClass="PanelAbsolute">
                                <table width="400px">
                                    <tr>
                                        <td class="LinkButton">
                                            สรุปค่าใช้จ่ายของงาน/โครงการ
                                        </td>
                                        <td align="right">
                                            ปิด <asp:ImageButton ID="cmdCloseExpenseSummary" runat="server" 
                                                ImageUrl="~/App_UI/Images/Buttons/Cancel.gif" OnClick="cmdCloseExpenseSummary_Click" />
                                        </td>
                                    </tr>
                                </table>
                                <asp:Repeater ID="Repeater4" runat="server">
                                    <HeaderTemplate>
                                        <div class="DivPopupHeader">
                                            <table>
                                                <tr>
                                                    <td align="left" width="120px" >แหล่งเงิน</td>
                                                    <td align="left" width="80px" >งบรายจ่าย</td>
                                                    <td align="right" width="90px" >คงเหลือ(บาท)</td>
                                                    <td align="right" width="90px" >ขออนุมัติ(บาท)</td>
                                                </tr>
                                            </table>
                                        </div>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <div style="padding-top: 3px; padding-bottom: 3px;">
                                            <table>
                                                <tr>
                                                    <td align="left" width="120px"><%# Eval("bgm_source_name")%></td>
                                                    <td align="left" width="80px"><%# Eval("bgm_exp_grp_name")%>
                                                        <input id="hBgmSourceSeq" type="hidden" name="hBgmSourceSeq" runat="server" value='<%# Eval("bgm_source_seq")%>' />
                                                        <input id="hBgmExpGrpSeq" type="hidden" name="hBgmExpGrpSeq" runat="server" value='<%# Eval("bgm_exp_grp_seq")%>' />
                                                    </td>
                                                    <td align="right" style="color: #6699FF" width="90px"><asp:Label ID="lblRemainAmount" runat="server" Text='<%# Eval("remain_amount", "{0:n}")%>' /></td>
                                                    <td align="right" style="color: #0000FF" width="90px"><asp:Label ID="lblProjectAmount" runat="server" Text='<%# Eval("project_amount", "{0:n}")%>' /></td>
                                                </tr>
                                            </table>
                                        </div>
                                    </ItemTemplate>
                                </asp:Repeater>
                                <div style="padding-top: 5px; padding-bottom: 5px; background-color: #D8DFEA;">
                                    <table width="400px">
                                        <tr>
                                            <td align="right">
                                                รวม :
                                            </td>
                                            <td width="90px" align="right">
                                                <asp:Label ID="lblSumRemainAmount" runat="server" ForeColor="Blue" />
                                            </td>
                                            <td width="90px" align="right">
                                                <asp:Label ID="lblSumProjectAmount" runat="server" ForeColor="Red" />
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </asp:Panel>
                        </div>
                        <div class="DivBody">
                            <telerik:RadGrid GroupingSettings-CaseSensitive="false" ID="grdBgmProjectOperationExpense" runat="server" AutoGenerateColumns="false"
                                AllowMultiRowEdit="false" AllowMultiRowSelection="false" AllowFilteringByColumn="true"
                                Width="820px" AllowPaging="false" ShowFooter="false"
                                GroupingSettings-GroupByFieldsSeparator="&nbsp;&nbsp;&nbsp;&nbsp;"
                                GroupingSettings-GroupContinuedFormatString=""
                                GroupingSettings-GroupContinuesFormatString=""
                                GroupingSettings-GroupSplitFormat=""
                                OnItemCommand="grdBgmProjectOperationExpense_ItemCommand"
                                OnItemDataBound="grdBgmProjectOperationExpense_ItemDataBound">
                                <MasterTableView AllowMultiColumnSorting="True" CellSpacing="-1" GroupLoadMode="Client"
                                    DataKeyNames="m_bgm_projectexpense.bgm_exp_seq" NoMasterRecordsText="< ไม่มีข้อมูล >" GroupsDefaultExpanded="true">
                                    <Columns>
                                        <telerik:GridBoundColumn DataField="bgm_proj_exp_seq"
                                            UniqueName="bgm_proj_exp_seq" Visible="False">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="m_bgm_projectexpense.bgm_proj_seq"
                                            HeaderText="m_bgm_projectexpense.bgm_proj_seq" UniqueName="m_bgm_projectexpense.bgm_proj_seq" Visible="False">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="m_bgm_projectexpense.descr"
                                            UniqueName="m_bgm_projectexpense.descr" Visible="False">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="m_bgm_projectexpense.bgm_source_seq"
                                            HeaderText="แหล่งเงิน" UniqueName="m_bgm_projectexpense.bgm_source_seq" Visible="False"
                                            GroupByExpression="m_bgm_projectexpense.m_bgm_mas_source.bgm_source_name Group By m_bgm_projectexpense.bgm_source_seq">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="m_bgm_projectexpense.m_bgm_mas_source.bgm_source_name"
                                            HeaderText="แหล่งเงิน" UniqueName="m_bgm_projectexpense.m_bgm_mas_source.bgm_source_name" Visible="False">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="m_bgm_projectexpense.bgm_exp_seq"
                                            HeaderText="รหัสค่าใช้จ่าย" UniqueName="m_bgm_projectexpense.bgm_exp_seq" Visible="False">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="m_bgm_projectexpense.m_bgm_mas_expense.bgm_exp_grp_seq"
                                            HeaderText="รหัสงบรายจ่าย" UniqueName="m_bgm_projectexpense.m_bgm_mas_expense.bgm_exp_grp_seq" Visible="False">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="m_bgm_projectexpense.m_bgm_mas_expense.bgm_exp_grp_name"
                                            HeaderText="งบรายจ่าย" UniqueName="m_bgm_projectexpense.m_bgm_mas_expense.bgm_exp_grp_name" Visible="False"
                                            GroupByExpression="m_bgm_projectexpense.m_bgm_mas_expense.bgm_exp_grp_name Group By m_bgm_projectexpense.m_bgm_mas_expense.bgm_exp_grp_seq">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="bgm_proj_oper_exp_seq"
                                            HeaderText="bgm_proj_oper_exp_seq" UniqueName="bgm_proj_oper_exp_seq" Visible="False">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="bgm_proj_oper_exp_descr"
                                            HeaderText="bgm_proj_oper_exp_descr" UniqueName="bgm_proj_oper_exp_descr" Visible="false">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="bgm_proj_oper_seq"
                                            HeaderText="bgm_proj_oper_seq" UniqueName="bgm_proj_oper_seq" Visible="False">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="exp_rate_count"
                                            HeaderText="exp_rate_count" UniqueName="exp_rate_count" Visible="False">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="m_bgm_projectexpense.icm_res_item_seq"
                                            HeaderText="m_bgm_projectexpense.icm_res_item_seq" UniqueName="m_bgm_projectexpense.icm_res_item_seq" Visible="False">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="unit_price"
                                            HeaderText="unit_price" UniqueName="unit_price" Visible="False">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="unit_qty"
                                            HeaderText="unit_qty" UniqueName="unit_qty" Visible="False">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="m_bgm_projectexpense.unit_price"
                                            UniqueName="m_bgm_projectexpense.unit_price" Visible="False">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="m_bgm_projectexpense.unit_qty"
                                            UniqueName="m_bgm_projectexpense.unit_qty" Visible="False">
                                        </telerik:GridBoundColumn>
                                        
                                        <telerik:GridBoundColumn DataField="m_bgm_projectexpense.m_bgm_mas_expense.bgm_exp_name" HeaderText="ค่าใช้จ่าย"
                                            UniqueName="m_bgm_projectexpense.m_bgm_mas_expense.bgm_exp_name" FilterControlWidth="100%" AutoPostBackOnFilter="true"
                                            CurrentFilterFunction="Contains" ShowFilterIcon="False">
                                            <HeaderStyle Width="55%" HorizontalAlign="Center" />
                                            <ItemStyle Width="55%" HorizontalAlign="Left" />
                                        </telerik:GridBoundColumn>
                                        
                                        <telerik:GridBoundColumn DataField="m_bgm_projectexpense.amount" HeaderText="เงินจัดสรร(บาท)"
                                            UniqueName="m_bgm_projectexpense.amount" FilterControlWidth="100%" AutoPostBackOnFilter="true"
                                            CurrentFilterFunction="Contains" ShowFilterIcon="False" AllowFiltering="false"
                                            DataFormatString="{0:n2}">
                                            <HeaderStyle Width="20%" HorizontalAlign="Center" />
                                            <ItemStyle Width="20%" HorizontalAlign="Right" />
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="amount" HeaderText="จำนวนเงินที่ขอ(บาท)"
                                            UniqueName="amount" FilterControlWidth="100%" AutoPostBackOnFilter="true"
                                            CurrentFilterFunction="Contains" ShowFilterIcon="False" AllowFiltering="false"
                                            DataFormatString="{0:n2}">
                                            <HeaderStyle Width="20%" HorizontalAlign="Center" />
                                            <ItemStyle Width="20%" HorizontalAlign="Right" />
                                        </telerik:GridBoundColumn>
                                        <telerik:GridTemplateColumn UniqueName="button" AllowFiltering="false">
                                            <HeaderStyle Width="5%" HorizontalAlign="Center" />
                                            <ItemStyle Width="5%" HorizontalAlign="Center" />
                                            <ItemTemplate>
                                                <asp:LinkButton ID="cmdAddExpense" runat="server" CssClass="LinkButton" CommandName="AddExpense">
                                                    <img alt="" src="../Images/Buttons/Edit.gif" />
                                                </asp:LinkButton>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                    </Columns>
                                </MasterTableView>
                                <GroupingSettings GroupByFieldsSeparator="&nbsp;&nbsp;&nbsp;&nbsp;" 
                                    GroupContinuedFormatString="" GroupContinuesFormatString="" 
                                    GroupSplitFormat="" />
                                <ClientSettings EnableRowHoverStyle="False">
                                    <Selecting AllowRowSelect="false" />
                                </ClientSettings>
                            </telerik:RadGrid>
                        </div>
                        <asp:Panel ID="PanelOpacity" runat="server" Visible="false" CssClass="Opacity">
                        </asp:Panel>
                        <asp:Panel ID="PanelProjOperExp" runat="server" CssClass="PanelAbsoluteEdit" Visible="false">
                            <div class="DivPopupHeader">
                                <table>
                                    <tr>
                                        <td>
                                            บันทึกจำนวนเงิน
                                        </td>
                                        <td>
                                            <asp:Label ID="lblBgmExpName" runat="server" ForeColor="Blue" />
                                            <asp:Label ID="lblBgmProjOperExpSeq" runat="server" Visible="false" />
                                            <asp:Label ID="lblBgmProjExpSeq" runat="server" Visible="false" />
                                            <asp:Label ID="lblBgmExpSeq" runat="server" Visible="false" />
                                            <asp:Label ID="lblBgmExpGrpSeq" runat="server" Visible="false" />
                                            <asp:Label ID="lblBgmSourceSeq" runat="server" Visible="false" />
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            <div class="DivPopupBody">
                                <asp:Panel ID="PanelExpRate" runat="server">
                                    <%--<div style="padding: 5px 5px 10px 5px; border: 1px solid #999999;">
                                        <asp:Repeater ID="RepeaterFilter" runat="server" OnItemDataBound="RepeaterFilter_ItemDataBound">
                                            <HeaderTemplate>
                                                <div style="border-bottom-style: solid; border-width: 1px; border-color: #999999; padding-bottom: 5px; margin-bottom: 10px;" >
                                                    <table>
                                                        <tr>
                                                            <td colspan="2">
                                                                <span class="FinHeader">กรองข้อมูลอัตราค่าใช้จ่าย</span>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </div>
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <table>
                                                    <tr>
                                                        <td align="right" width="245px">
                                                            <%# Eval("exp_rate_type_grp_name")%> :
                                                            <asp:Label ID="lblExpRateTypeGrpSeq" runat="server" Visible="false"
                                                                Text='<%# Eval("exp_rate_type_grp_seq")%>' />
                                                        </td>
                                                        <td align="left">
                                                            <telerik:RadComboBox ID="ddlExpRateTypeSeq" runat="server"
                                                                DataTextField="exp_rate_type_name" DataValueField="exp_rate_type_seq"
                                                                Filter="Contains" AutoPostBack="true" Width="395px"
                                                                OnSelectedIndexChanged="ddlExpRateTypeSeq_SelectedIndexChanged">
                                                            </telerik:RadComboBox>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </ItemTemplate>
                                        </asp:Repeater>
                                    </div>--%>
                                    <div style="padding: 5px 5px 10px 5px; border: 1px solid #999999; background-color: #D9D9FF">
                                        <asp:Repeater ID="RepeaterExpRate" runat="server" OnItemDataBound="RepeaterExpRate_ItemDataBound">
                                            <HeaderTemplate>
                                                <div style="border-bottom-style: solid; border-width: 1px; border-color: #999999; padding-bottom: 5px; margin-bottom: 10px;" >
                                                    <table>
                                                        <tr>
                                                            <td>
                                                                <span class="FinHeader">อัตราค่าใช้จ่าย</span>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </div>
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <div style="border-bottom-style: dotted; border-width: 1px; border-color: #999999;" >
                                                <table>
                                                    <tr>
                                                        <td width="245px" rowspan="2">
                                                            <asp:Label ID="lblExpRateName" runat="server" Text='<%# Eval("exp_rate_name")%>' />
                                                            <asp:Label ID="lblExpRateSeq" runat="server" Visible="false"
                                                                Text='<%# Eval("exp_rate_seq")%>' />
                                                            <asp:Label ID="lblBgmProjOperExpRateSeq" runat="server" Visible="false"
                                                                Text='<%# Eval("bgm_proj_oper_exp_rate_seq")%>' />
                                                            <asp:Label ID="lblExpRateDescr" runat="server" Visible="false"
                                                                Text='<%# Eval("exp_rate_descr")%>' />
                                                            <asp:Label ID="lblRelateMan" runat="server" Visible="false"
                                                                Text='<%# Eval("relate_man")%>' />
                                                            <asp:Label ID="lblRelateDay" runat="server" Visible="false"
                                                                Text='<%# Eval("relate_day")%>' />
                                                        </td>
                                                        <td width="100px">
                                                            <input id="hAmountMin" runat="server" type="hidden" value='<%# Eval("amount_min")%>' />
                                                            <input id="hAmountMax" runat="server" type="hidden" value='<%# Eval("amount_max")%>' />
                                                            <telerik:RadNumericTextBox ID="txtAmount" runat="server" Width="100px" CssClass="NumericTextBox"
                                                                Text='<%# Eval("amount")%>' AutoPostBack="True" OnTextChanged="txtAmount_TextChanged">
                                                            </telerik:RadNumericTextBox>
                                                        </td>
                                                        <td width="200px">
                                                            &nbsp;ต่อ&nbsp;
                                                            <telerik:RadNumericTextBox ID="txtMan" runat="server" Width="40px" CssClass="NumericTextBox" Visible="false"
                                                                Text='<%# Eval("man")%>' AutoPostBack="True" OnTextChanged="txtMan_TextChanged">
                                                                <NumberFormat DecimalDigits="0" />
                                                            </telerik:RadNumericTextBox>
                                                            <asp:Label ID="lblMan" runat="server" Text=" คน" Visible="false" />
                                                            <telerik:RadNumericTextBox ID="txtDay" runat="server" Width="40px" CssClass="NumericTextBox" Visible="false"
                                                                Text='<%# Eval("day")%>' AutoPostBack="True" OnTextChanged="txtDay_TextChanged">
                                                                <NumberFormat DecimalDigits="0" />
                                                            </telerik:RadNumericTextBox>
                                                            <asp:Label ID="lblDay" runat="server" Text=" วัน" Visible="false" />
                                                            <telerik:RadNumericTextBox ID="txtHour" runat="server" Width="40px" CssClass="NumericTextBox" Visible="false"
                                                                Text='<%# Eval("hour")%>' AutoPostBack="True" OnTextChanged="txtHour_TextChanged">
                                                            </telerik:RadNumericTextBox>
                                                            <asp:Label ID="lblHour" runat="server" Text=" ชั่วโมง" Visible="false" />
                                                            <telerik:RadNumericTextBox ID="txtMinute" runat="server" Width="40px" CssClass="NumericTextBox" Visible="false"
                                                                Text='<%# Eval("minute")%>' AutoPostBack="True" OnTextChanged="txtMinute_TextChanged">
                                                            </telerik:RadNumericTextBox>
                                                            <asp:Label ID="lblMinute" runat="server" Text=" นาที" Visible="false" />
                                                        </td>
                                                        <td>
                                                            =
                                                        </td>
                                                        <td width="105px" align="right">
                                                            <asp:Label ID="lblTotalAmount" runat="server" ForeColor="Blue" Text='<%# Eval("total_amount", "{0:n2}")%>' />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td width="100px" align="right">
                                                            <asp:LinkButton ID="cmdAmountMax" runat="server" CssClass="LinkButton" OnClick="cmdAmountMax_Click"
                                                                ToolTip="คลิก เพื่อใช้จำนวนเงินตามอัตราสูงสุด">
                                                                ไม่เกิน <%# Eval("amount_max", "{0:n2}")%>
                                                            </asp:LinkButton>
                                                        </td>
                                                    </tr>
                                                </table>
                                                </div>
                                            </ItemTemplate>
                                        </asp:Repeater>
                                        
                                    </div>
                                </asp:Panel>
                                <asp:Panel ID="PanelInv" runat="server">
                                    <div style="padding: 5px 5px 10px 5px; border: 1px solid #999999;">
                                        <table>
                                            <tr>
                                                <td align="right" width="245px">
                                                    ประเภทของพัสดุ :
                                                </td>
                                                <td>
                                                    <asp:Label ID="lblIcmResItemSeq" runat="server" Visible="false" />
                                                    <asp:Label ID="lblIcmResItemCode" runat="server" ForeColor="Blue" /> : 
                                                    <asp:Label ID="lblIcmResItemName" runat="server" ForeColor="Blue" />
                                                </td>
                                            </tr>
                                        </table>
                                        <table>
                                            <tr>
                                                <td align="right" width="245px">
                                                    จำนวนหน่วย :
                                                </td>
                                                <td>
                                                    <telerik:RadNumericTextBox ID="txtUnitQtyProj" runat="server" 
                                                        class="NumericTextBox" AutoPostBack="True" MinValue="0" 
                                                        ontextchanged="txtUnitQtyProj_TextChanged" > 
                                                        <NumberFormat DecimalDigits="0" />
                                                    </telerik:RadNumericTextBox>
                                                    หน่วย
                                                </td>
                                            </tr>
                                        </table>
                                        <table>
                                            <tr>
                                                <td align="right" width="245px">
                                                    จำนวนเงินต่อหน่วย :
                                                </td>
                                                <td>
                                                    <telerik:RadNumericTextBox ID="txtUnitPriceProj" runat="server"
                                                        class="NumericTextBox" AutoPostBack="True" MinValue="0"
                                                        ontextchanged="txtUnitPriceProj_TextChanged" >
                                                        <NumberFormat DecimalDigits="2" />
                                                    </telerik:RadNumericTextBox> บาท
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </asp:Panel>
                                <table>
                                    <tr>
                                        <td align="right" width="120px">
                                            จำนวนเงินที่เหลือ :
                                        </td>
                                        <td align="right" width="150px">
                                            <asp:LinkButton ID="lblRemainAmount" runat="server" CssClass="LinkButton" OnClick="lblRemainAmount_Click" /> บาท
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                </table>
                                <table>
                                    <tr>
                                        <td align="right" width="120px">

                                        </td>
                                        <td>
                                            <asp:CheckBox ID="chkManual" runat="server" Text="ใช้ค่าใช้จ่ายนอกเหนือจากที่กำหนดไว้ (ต้องกรอกข้อมูลรายละเอียดด้วย)"
                                                AutoPostBack="true" OnCheckedChanged="chkManual_CheckedChanged" />
                                        </td>
                                    </tr>
                                </table>
                                <table>
                                    <tr>
                                        <td align="right" width="120px">
                                            จำนวนเงินที่ขอ :
                                        </td>
                                        <td>
                                            <telerik:RadNumericTextBox ID="txtAmount" runat="server" CssClass="NumericTextBox">
                                            </telerik:RadNumericTextBox> บาท
                                            <span class="span">&nbsp;*</span>
                                        </td>
                                    </tr>
                                </table>
                                <table>
                                    <tr>
                                        <td align="right" width="150px" valign="top" style="padding-top: 5px">
                                            รายละเอียด :
                                        </td>
                                        <td>
                                            <telerik:RadTextBox ID="txtBgmProjOperExpDescr" runat="server"
                                                Width="350px" Height="100px" TextMode="MultiLine">
                                            </telerik:RadTextBox>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            <div class="DivInfo">
                                <table width="100%">
                                    <tr>
                                        <td align="center">
                                            <asp:LinkButton ID="cmdInsert2" runat="server" CssClass="LinkButton" onclick="cmdInsert2_Click" OnClientClick="javascript: return confirm('ต้องการบันทึกรายการนี้หรือไม่?');">
                                                <img alt="" id="img6" runat="server" height="14" src="~/App_UI/Images/Buttons/saveDisk.gif" /> บันทึกข้อมูล
                                            </asp:LinkButton>
                                            <asp:LinkButton ID="cmdUpdate2" runat="server" CssClass="LinkButton" onclick="cmdUpdate2_Click" OnClientClick="javascript: return confirm('ต้องการบันทึกรายการนี้หรือไม่?');">
                                                <img alt="" id="img3" runat="server" height="14" src="~/App_UI/Images/Buttons/saveDisk.gif" /> บันทึกข้อมูล
                                            </asp:LinkButton>&nbsp;
                                            <asp:LinkButton ID="cmdCancel2" runat="server" CssClass="LinkButton" onclick="cmdCancel2_Click">
                                                <img alt="" id="img5" runat="server" height="14" src="~/App_UI/Images/Buttons/Cancel.gif" /> ยกเลิกการแก้ไข
                                            </asp:LinkButton>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </asp:Panel>
                    </asp:Panel>
                    <asp:Panel ID="PanelProgress3" runat="server">
                        <div class="DivInfo">
                            <table>
                                <tr>
                                    <td width="150px" align="right">
                                        งาน/โครงการ :
                                    </td>
                                    <td>
                                        <asp:Label ID="lblBgmProjName2" runat="server" ForeColor="Blue" />
                                        <asp:Label ID="lblBgmProjOperPerSeq" runat="server" Visible="false" />
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div class="DivBody">
                            <ul class="RepeaterList">
                                <asp:Repeater ID="RepeaterPerson" runat="server" 
                                    OnItemCommand="RepeaterPerson_ItemCommand" >
                                    <HeaderTemplate>
                                        <li class="Header">
                                            <table>
                                                <tr>
                                                    <%--<td align="left" width="50px" style="font-weight: bold"></td>--%>
                                                    <td align="left" width="200px" style="font-weight: bold">ชื่อผู้ดำเนินโครงการ</td>
                                                    <td align="left" width="200px" style="font-weight: bold">สังกัด</td>
                                                    <td align="left" width="200px" style="font-weight: bold">ตำแหน่ง</td>
                                                    <td align="left" width="200px" style="font-weight: bold">ระดับ</td>
                                                </tr>
                                            </table>
                                        </li>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <li class="Item">
                                            <table>
                                                <tr>
                                                    <%--<td align="left" width="50px">
                                                        <asp:ImageButton ID="cmdDelete2" runat="server" CommandName="Delete" />
                                                    </td>--%>
                                                    <td align="left" width="200px"><asp:LinkButton ID="cmdRepeaterEdit" runat="server" CommandName="edit" Text='<%# Eval("per_name")%>'></asp:LinkButton>
                                                        <asp:Label ID="lblRepeaterBgmProjOperPerSeq" runat="server" Text='<%# Eval("bgm_proj_oper_per_seq")%>' Visible="false" />
                                                        <asp:Label ID="lblRepeaterEmpSeq" runat="server" Text='<%# Eval("emp_seq")%>' Visible="false" />
                                                    </td>
                                                    <td align="left" width="200px"><%# Eval("per_job_site_name")%></td>
                                                    <td align="left" width="200px"><%# Eval("per_pos_name")%></td>
                                                    <td align="left" width="200px"><%# Eval("per_class_name")%></td>
                                                </tr>
                                            </table>
                                        </li>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </ul>
                        </div>
                        <div class="DivBody">
                            <table>
                                <tr>
                                    <td width="150px" align="right">
                                        ชื่อผู้ดำเนินโครงการ :
                                    </td>
                                    <td>
                                        <telerik:RadComboBox ID="ddlEmpSeq" runat="server"
                                            Filter="Contains" style="z-index: 9900;"
                                            Visible="true" AutoPostBack="true"
                                            Height="190px" Width="600px"
                                            MarkFirstMatch="true" EnableLoadOnDemand="true"
                                            HighlightTemplatedItems="true" OnClientItemsRequested="UpdateItemCountField"
                                            OnDataBound="ddlEmpSeq_DataBound" OnItemDataBound="ddlApprover_ItemDataBound"
                                            OnItemsRequested="ddlEmpSeq_ItemsRequested"
                                            OnSelectedIndexChanged="ddlEmpSeq_SelectedIndexChanged">
                                            <HeaderTemplate>
                                                <table width="100%">
                                                    <tr>
                                                        <td align="center">ชื่อ-สกุล</td>
                                                        <td align="center" width="150px">ตำแหน่ง</td>
                                                        <td align="center" width="100px">ระดับ</td>
                                                        <td align="center" width="150px">สังกัด</td>
                                                    </tr>
                                                </table>
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <table width="100%">
                                                    <tr>
                                                        <td><%# DataBinder.Eval(Container.DataItem, "full_name") %></td>
                                                        <td width="150px"><%# DataBinder.Eval(Container.DataItem, "exec_pos_name")%></td>
                                                        <td width="100px"><%# DataBinder.Eval(Container.DataItem, "className") %></td>
                                                        <td width="150px"><%# DataBinder.Eval(Container.DataItem, "JobsiteName") %></td>
                                                    </tr>
                                                </table>
                                            </ItemTemplate>
                                            <FooterTemplate>
                                                ทั้งหมด
                                                <asp:Literal runat="server" ID="RadComboItemsCount" />
                                                รายการ
                                            </FooterTemplate>
                                        </telerik:RadComboBox>
                                    </td>
                                </tr>
                            </table>
                            <table>
                                <tr>
                                    <td width="150px" align="right">
                                        ตำแหน่ง :
                                    </td>
                                    <td>
                                        <asp:Label ID="lblPerPosName" runat="server" ForeColor="Blue" />
                                    </td>
                                </tr>
                            </table>
                            <table>
                                <tr>
                                    <td width="150px" align="right">
                                        ระดับ :
                                    </td>
                                    <td>
                                        <asp:Label ID="lblPerClassName" runat="server" ForeColor="Blue" />
                                    </td>
                                </tr>
                            </table>
                            <table>
                                <tr>
                                    <td width="150px" align="right">
                                        สังกัด :
                                    </td>
                                    <td>
                                        <asp:Label ID="lblPerJobsiteName" runat="server" ForeColor="Blue" />
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </asp:Panel>
                    <%--<asp:LinkButton ID="cmdExportToMsWord" runat="server" 
                        Text="พิมพ์ลงบน Microsoft Word" OnClick="cmdExportToMsWord_Click" />--%>
                    
                    <asp:Panel ID="PanelSummary" runat="server">
                    <div class="DivBody">
                        <asp:Panel ID="PanelMessageSend" runat="server" Visible="false">
                            <table width="100%">
                                <tr>
                                    <td width="100px" align="right">
                                        ชื่อผู้อนุมัติ :
                                    </td>
                                    <td align="left">
                                        <asp:Label ID="lblApproveEmpSeq" runat="server" Visible="false" />
                                        <asp:Label ID="lblApprovePosSeq" runat="server" Visible="false" />
                                        <asp:Label ID="lblApprovePathSeq" runat="server" Visible="false" />
                                        <telerik:RadComboBox ID="ddlApprover" runat="server"
                                            Filter="Contains" style="z-index: 9900;"
                                            Visible="true" AutoPostBack="true"
                                            Height="190px" Width="600px"
                                            MarkFirstMatch="true" EnableLoadOnDemand="true"
                                            HighlightTemplatedItems="true" OnClientItemsRequested="UpdateItemCountField"
                                            OnDataBound="ddlApprover_DataBound" OnItemDataBound="ddlApprover_ItemDataBound"
                                            OnItemsRequested="ddlApprover_ItemsRequested"
                                            OnSelectedIndexChanged="ddlApprover_SelectedIndexChanged">
                                            <HeaderTemplate>
                                                <table width="100%">
                                                    <tr>
                                                        <td align="center">ชื่อ-สกุล</td>
                                                        <td align="center" width="150px">ตำแหน่ง</td>
                                                        <td align="center" width="100px">ระดับ</td>
                                                        <td align="center" width="150px">สังกัด</td>
                                                    </tr>
                                                </table>
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <table width="100%">
                                                    <tr>
                                                        <td><%# DataBinder.Eval(Container.DataItem, "full_name") %></td>
                                                        <td width="150px"><%# DataBinder.Eval(Container.DataItem, "exec_pos_name")%></td>
                                                        <td width="100px"><%# DataBinder.Eval(Container.DataItem, "className") %></td>
                                                        <td width="150px"><%# DataBinder.Eval(Container.DataItem, "JobsiteName") %></td>
                                                    </tr>
                                                </table>
                                            </ItemTemplate>
                                            <FooterTemplate>
                                                ทั้งหมด
                                                <asp:Literal runat="server" ID="RadComboItemsCount" />
                                                รายการ
                                            </FooterTemplate>
                                        </telerik:RadComboBox>
                                    </td>
                                </tr>
                            </table>
                            <table width="100%">
                                <tr>
                                    <td width="100px" align="right">
                                        ตำแหน่ง :
                                    </td>
                                    <td align="left">
                                        <asp:Label ID="lblPosName" runat="server" ForeColor="Brown" Visible="true" />
                                    </td>
                                    <td width="100px" align="right">
                                        ระดับ :
                                    </td>
                                    <td align="left">
                                        <asp:Label ID="lblClassName" runat="server" ForeColor="Brown" Visible="true" />
                                    </td>
                                </tr>
                            </table>
                            <table width="100%">
                                <tr>
                                    <td width="100px" align="right">
                                        ตำแหน่งบริหาร :
                                    </td>
                                    <td align="left">
                                        <asp:Label ID="lblExecPosName" runat="server" ForeColor="Brown" Visible="true" />
                                    </td>
                                </tr>
                            </table>
                            <table width="100%">
                                <tr>
                                    <td width="100px" align="right">
                                        หน่วยงาน :
                                    </td>
                                    <td align="left">
                                        <asp:Label ID="lblJobsiteName" runat="server" ForeColor="Brown" Visible="true" />
                                    </td>
                                </tr>
                            </table>
                            <br />
                            <table width="100%" style="border-top-style: solid; border-width: 1px; border-color: #999999">
                                <tr>
                                    <td align="center">
                                        <asp:LinkButton ID="cmdSave" runat="server"
                                            Text="บันทึก" CssClass="LinkButton"
                                            OnClientClick="javascript: return confirm('ต้องการส่งขออนุมัติหรือไม่?');"
                                            OnClick="cmdSave_Click" />
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </div>
                    <div class="DivInfo">
                        <table width="100%">
                            <tr>
                                <td class="FinHeader">
                                    ข้อมูลโครงการ
                                </td>
                                <td align="right" class="FinHeader">
                                    <asp:Label ID="lblFinRecordStatusName" runat="server" />
                                    <asp:Label ID="lblFinRecordStatus" runat="server" Visible="false" />
                                </td>
                            </tr>
                        </table>
                        <table id="tableSendBackRemark" runat="server">
                            <tr>
                                <td>
                                    หมายเหตุในการตีกลับ
                                </td>
                                <td>
                                    <asp:Label ID="lblSendBackRemark" runat="server" ForeColor="Red" />
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div class="DivBody">
                        <div class="DivBody">
                        <table>
                            <tr>
                                <td>
                                    ปีงบประมาณ :
                                </td>
                                <td>
                                    <asp:Label ID="lblFinBgmYear" runat="server" ForeColor="Blue" />
                                </td>
                                <td>
                                    &nbsp;&nbsp;&nbsp;&nbsp;วันที่ทำรายการ :
                                </td>
                                <td>
                                    <asp:Label ID="lblFinBgmProjOperDate" runat="server" ForeColor="Blue" />
                                </td>
                            </tr>
                        </table>
                        <table>
                            <tr>
                                <td>
                                    รหัสขออนุมัติดำเนินงาน :
                                </td>
                                <td>
                                    <asp:Label ID="lblFinBgmProjOperCode" runat="server" ForeColor="Blue" />
                                </td>
                            </tr>
                        </table>

                        <table>
                            <tr>
                                <td>
                                    ผลผลิต :
                                </td>
                                <td>
                                    <asp:Label ID="lblFinBgmOutputName" runat="server" ForeColor="Blue" />
                                </td>
                            </tr>
                        </table>
                        <table>
                            <tr>
                                <td>
                                    กิจกรรมหลัก :
                                </td>
                                <td colspan="3">
                                    <asp:Label ID="lblFinBgmActName" runat="server" ForeColor="Blue" />
                                </td>
                            </tr>
                        </table>
                        <table>
                            <tr>
                                <td>
                                    กิจกรรมย่อย :
                                </td>
                                <td colspan="3">
                                    <asp:Label ID="lblFinBgmSubActName" runat="server" ForeColor="Blue" />
                                </td>
                            </tr>
                        </table>
                        <table>
                            <tr>
                                <td>
                                    ชื่อโครงการ :
                                </td>
                                <td colspan="3">
                                    <asp:Label ID="lblFinBgmProjName" runat="server" ForeColor="Blue" />
                                </td>
                            </tr>
                        </table>
                        <table>
                            <tr>
                                <td>
                                    ชื่อคำขออนุมัติดำเนินงาน :
                                </td>
                                <td colspan="3">
                                    <asp:Label ID="lblFinBgmProjOperName" runat="server" ForeColor="Blue" />
                                </td>
                            </tr>
                        </table>
                        <table>
                            <tr>
                                <td valign="top">
                                    แผนงาน :
                                </td>
                                <td>
                                    <table>
                                        <asp:Repeater ID="Repeater2" runat="server">
                                            <HeaderTemplate>
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <tr>
                                                    <td align="left" style="color: #0000FF">- <%# Eval("bgm_option_name")%></td>
                                                </tr>
                                            </ItemTemplate>
                                        </asp:Repeater>
                                    </table>
                                </td>
                            </tr>
                        </table>
                        <table>
                            <tr>
                                <td>
                                    วันที่เริ่มต้น :
                                </td>
                                <td>
                                    <asp:Label ID="lblFinStartDate" runat="server" ForeColor="Blue">
                                    </asp:Label>
                                </td>
                                <td>
                                    &nbsp;&nbsp;&nbsp;&nbsp;วันที่สิ้นสุด :
                                </td>
                                <td>
                                    <asp:Label ID="lblFinEndDate" runat="server" ForeColor="Blue">
                                    </asp:Label>
                                </td>
                                <td>
                                    &nbsp;&nbsp;&nbsp;&nbsp;จำนวนผู้เข้าร่วมกิจกรรม :
                                </td>
                                <td>
                                    <asp:Label ID="lblFinAttendCount" runat="server" ForeColor="Blue">
                                    </asp:Label>
                                </td>
                            </tr>
                        </table>
                        </div>
                    </div>
                    <div class="DivInfo">
                        <span class="FinHeader">ข้อมูลค่าใช้จ่ายในโครงการ</span>
                    </div>
                    <div class="DivBody">
                        <div class="DivBody">
                        <asp:Repeater ID="RepeaterBgmSource" runat="server">
                            <HeaderTemplate>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <table width="100%" cellpadding="0" cellspacing="0">
                                    <tr valign="top">
                                        <td align="left" style="color: #0000FF; padding-top: 3px; padding-bottom: 3px; background-color: #D8DFEA;">
                                            แหล่งเงิน : <%# Eval("bgm_source_name") %>
                                        </td>
                                        <td width="100px" align="right" style="color: #0000FF; padding-top: 3px; padding-bottom: 3px; background-color: #D8DFEA;">
                                            <%# Eval("amount", "{0:n2}")%>
                                        </td>
                                    </tr>
                                </table>
                                <table width="100%" cellpadding="0" cellspacing="0">
                                    <tr valign="top">
                                        <td align="left" width="20px" style=" background-color: #D8DFEA;">
                                            <asp:Label ID="lblBgmSourceSeq" runat="server" Visible="false" Text='<%# Eval("bgm_source_seq")%>' />
                                        </td>
                                        <td align="left">
                                            <%--<asp:Repeater ID="RepeaterBgmExpGrp" runat="server">
                                                <HeaderTemplate>
                                                </HeaderTemplate>
                                                <ItemTemplate>
                                                    <table width="100%" cellpadding="0" cellspacing="0">
                                                        <tr valign="top">
                                                            <td colspan="2" style="color: #0000FF; padding-top: 3px; padding-bottom: 3px; background-color: #DFE4EC;">
                                                                งบรายจ่าย : <%# Eval("bgm_exp_grp_name")%>
                                                            </td>
                                                            <td width="100px" align="right" style="color: #0000FF; padding-top: 3px; padding-bottom: 3px; background-color: #DFE4EC;">
                                                                <%# Eval("amount", "{0:n2}")%>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                    <table width="100%" cellpadding="0" cellspacing="0">
                                                        <tr valign="top">
                                                            <td width="20px" style=" background-color: #DFE4EC;">
                                                                <asp:Label ID="lblBgmExpGrpSeq" runat="server" Visible="false" Text='<%# Eval("bgm_exp_grp_seq")%>' />
                                                            </td>
                                                            <td colspan="2">
                                                                <asp:Repeater ID="RepeaterBgmExp2" runat="server">
                                                                    <HeaderTemplate>
                                                                    </HeaderTemplate>
                                                                    <ItemTemplate>
                                                                        <table width="100%" cellpadding="0" cellspacing="0" class="tableNoSpacingNoPadding">
                                                                            <tr valign="top">
                                                                                <td style="color: #0000FF; padding-top: 3px; padding-bottom: 3px; background-color: #E7EBF1;">
                                                                                    หมวดค่าใช้จ่าย : <%# Eval("bgm_exp_name")%>
                                                                                </td>
                                                                                <td width="100px" align="right" style="color: #0000FF; padding-top: 3px; padding-bottom: 3px; background-color: #E7EBF1;">
                                                                                    <%# Eval("amount", "{0:n2}")%>
                                                                                </td>
                                                                            </tr>
                                                                        </table>
                                                                        <table width="100%" cellpadding="0" cellspacing="0">
                                                                            <tr valign="top">
                                                                                <td width="20px" style=" background-color: #E7EBF1;">
                                                                                    <asp:Label ID="lblBgmExpSeq" runat="server" Visible="false" Text='<%# Eval("bgm_exp_seq")%>' />
                                                                                </td>
                                                                                <td colspan="2">
                                                                                    <asp:Repeater ID="RepeaterBgmExp1" runat="server">
                                                                                        <HeaderTemplate>
                                                                                        </HeaderTemplate>
                                                                                        <ItemTemplate>
                                                                                            <table width="100%" cellpadding="0" cellspacing="0" class="tableNoSpacingNoPadding">
                                                                                                <tr valign="top">
                                                                                                    <td style="color: #0000FF; padding-top: 3px; padding-bottom: 3px; background-color: #EEF1F7;">
                                                                                                        รายการค่าใช้จ่าย : <%# Eval("bgm_exp_name")%>
                                                                                                    </td>
                                                                                                    <td width="100px" align="right" style="color: #0000FF; padding-top: 3px; padding-bottom: 3px; background-color: #EEF1F7;">
                                                                                                        <%# Eval("amount", "{0:n2}")%>
                                                                                                    </td>
                                                                                                </tr>
                                                                                            </table>
                                                                                            <table width="100%" cellpadding="0" cellspacing="0">
                                                                                                <tr valign="top">
                                                                                                    <td width="20px" style="background-color: #EEF1F7;">
                                                                                                        <asp:Label ID="lblBgmExpSeq" runat="server" Visible="false" Text='<%# Eval("bgm_exp_seq")%>' />
                                                                                                    </td>
                                                                                                    <td colspan="2">--%>
                                            <asp:Repeater ID="RepeaterBgmExp" runat="server">
                                                <HeaderTemplate>
                                                </HeaderTemplate>
                                                <ItemTemplate>
                                                    <table width="100%" cellpadding="0" cellspacing="0" class="tableNoSpacingNoPadding">
                                                        <tr valign="top">
                                                            <td style="padding-top: 3px; padding-bottom: 3px;">
                                                                ค่าใช้จ่าย : <%# Eval("m_bgm_projectexpense.m_bgm_mas_expense.bgm_exp_name")%>
                                                            </td>
                                                            <td width="150px" style="padding-top: 3px; padding-bottom: 3px;">
                                                                <%# Eval("bgm_proj_oper_exp_descr")%>
                                                            </td>
                                                            <td width="100px" align="right" style="padding-top: 3px; padding-bottom: 3px;">
                                                                <%# Eval("amount", "{0:n2}")%>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </ItemTemplate>
                                            </asp:Repeater>
                                                                                                    <%--</td>
                                                                                                </tr>
                                                                                            </table>
                                                                                        </ItemTemplate>
                                                                                    </asp:Repeater>
                                                                                </td>
                                                                            </tr>
                                                                        </table>
                                                                    </ItemTemplate>
                                                                </asp:Repeater>
                                                            </td>
                                                        </tr>
                                                     </table>
                                                </ItemTemplate>
                                            </asp:Repeater>--%>
                                        </td>
                                    </tr>
                                </table>
                            </ItemTemplate>
                        </asp:Repeater>
                        <table width="100%" cellpadding="0" cellspacing="0">
                            <tr>
                                <td align="right" style="padding-top: 3px; padding-bottom: 3px;">
                                    รวม : 
                                </td>
                                <td align="right" width="150px" style="border-width: 1px; padding-top: 3px; padding-bottom: 3px; border-top-style: solid;">
                                    <asp:Label ID="lblFinSumAmount" runat="server" ForeColor="Blue" />
                                </td>
                            </tr>
                        </table>
                        </div>
                    </div>
                    <div class="DivInfo">
                        <span class="FinHeader">ข้อมูลผู้ดำเนินงาน</span>
                    </div>
                    <div class="DivBody">
                        <ul class="RepeaterList">
                            <asp:Repeater ID="Repeater3" runat="server">
                                <HeaderTemplate>
                                    <li class="Header">
                                        <table>
                                            <tr>
                                                <td align="left" width="200px" style="font-weight: bold">ชื่อผู้ดำเนินโครงการ</td>
                                                <td align="left" width="200px" style="font-weight: bold">สังกัด</td>
                                                <td align="left" width="200px" style="font-weight: bold">ตำแหน่ง</td>
                                                <td align="left" width="200px" style="font-weight: bold">ระดับ</td>
                                            </tr>
                                        </table>
                                    </li>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <li class="Item">
                                        <table>
                                            <tr>
                                                <td align="left" width="200px"><%# Eval("per_name")%></td>
                                                <td align="left" width="200px"><%# Eval("per_job_site_name")%></td>
                                                <td align="left" width="200px"><%# Eval("per_pos_name")%></td>
                                                <td align="left" width="200px"><%# Eval("per_class_name")%></td>
                                            </tr>
                                        </table>
                                    </li>
                                </ItemTemplate>
                            </asp:Repeater>
                        </ul>
                    </div>
                    </asp:Panel>
                    <asp:Panel ID="PanelViewAll" runat="server">
                        <div class="DivInfo">
                            <table>
                                <tr>
                                    <td width="150px" align="right">
                                        ปีงบประมาณ :
                                    </td>
                                    <td>
                                        <telerik:RadNumericTextBox ID="txtFilterBgmYear" runat="server"
                                            Width="100px" ShowSpinButtons="True" AutoPostBack="true"
                                            NumberFormat-DecimalDigits="0" NumberFormat-GroupSeparator=""
                                            OnTextChanged="txtFilterBgmYear_TextChanged" />
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div class="DivBody">
                            <telerik:RadGrid GroupingSettings-CaseSensitive="false" ID="GrdViewAll" runat="server"
                                AutoGenerateColumns="false" AllowMultiRowEdit="false" 
                                AllowMultiRowSelection="false"
                                ShowStatusBar="false" AllowPaging="true" 
                                AllowSorting="true" AllowFilteringByColumn="true"
                                Width="810px"
                                GroupingSettings-GroupByFieldsSeparator="&nbsp;&nbsp;&nbsp;&nbsp;"
                                GroupingSettings-GroupContinuedFormatString=""
                                GroupingSettings-GroupContinuesFormatString=""
                                GroupingSettings-GroupSplitFormat=""
                                OnItemDataBound="GrdViewAll_ItemDataBound"
                                OnItemCommand="GrdViewAll_ItemCommand">
                                <MasterTableView AllowMultiColumnSorting="true" CellSpacing="-1"
                                    DataKeyNames="bgm_proj_oper_seq" NoMasterRecordsText="< ไม่มีข้อมูล >">
                                    <RowIndicatorColumn>
                                        <HeaderStyle Width="20px" />
                                    </RowIndicatorColumn>
                                    <ExpandCollapseColumn>
                                        <HeaderStyle Width="20px" />
                                    </ExpandCollapseColumn>
                                    <Columns>
                                        <telerik:GridBoundColumn DataField="bgm_proj_oper_seq"
                                            UniqueName="bgm_proj_oper_seq" Visible="False">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="record_status" 
                                            UniqueName="record_status" Visible="False">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="bgm_proj_oper_date" HeaderText="วันที่ทำรายการ"
                                            UniqueName="bgm_proj_oper_date" FilterControlWidth="100%" AutoPostBackOnFilter="true"
                                            CurrentFilterFunction="Contains" ShowFilterIcon="False" DataFormatString="{0:d}">
                                            <ItemStyle Width="70px" HorizontalAlign="Left" />
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="bgm_proj_oper_code" HeaderText="รหัสรายการ"
                                            UniqueName="bgm_proj_oper_code" FilterControlWidth="100%" AutoPostBackOnFilter="true"
                                            CurrentFilterFunction="Contains" ShowFilterIcon="False">
                                            <ItemStyle Width="100px" HorizontalAlign="Left" />
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="bgm_proj_oper_name" HeaderText="ชื่อรายการ"
                                            UniqueName="bgm_proj_oper_name" FilterControlWidth="100%" AutoPostBackOnFilter="true"
                                            CurrentFilterFunction="Contains" ShowFilterIcon="False">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="sum_amount" HeaderText="จำนวนเงินที่ขอ"
                                            UniqueName="sum_amount" FilterControlWidth="100%" AutoPostBackOnFilter="true"
                                            CurrentFilterFunction="Contains" ShowFilterIcon="False" DataFormatString="{0:n2}"
                                            AllowFiltering="false">
                                            <ItemStyle Width="120px" HorizontalAlign="Right" />
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="record_status_name" HeaderText="สถานะรายการ"
                                            UniqueName="record_status_name" FilterControlWidth="100%" AutoPostBackOnFilter="true"
                                            CurrentFilterFunction="Contains" ShowFilterIcon="False">
                                            <ItemStyle Width="100px" HorizontalAlign="Left" />
                                        </telerik:GridBoundColumn>
                                    </Columns>
                                    <PagerStyle Mode="NumericPages" AlwaysVisible="true" 
                                        FirstPageToolTip="กลับหน้าแรก" LastPageToolTip="ไปหน้าสุดท้าย" 
                                        NextPagesToolTip="หน้าถัดไป" NextPageToolTip="หน้าถัดไป" 
                                        PrevPagesToolTip="ย้อนกลับ" PrevPageToolTip="ย้อนกลับ" />
                                </MasterTableView>
                                <GroupingSettings GroupByFieldsSeparator="&nbsp;&nbsp;&nbsp;&nbsp;" 
                                    GroupContinuedFormatString="" GroupContinuesFormatString="" 
                                    GroupSplitFormat="" />
                                <ClientSettings EnableRowHoverStyle="false" EnablePostBackOnRowClick="false">
                                    <Selecting AllowRowSelect="true" />
                                    <Scrolling AllowScroll="false" UseStaticHeaders="false" />
                                </ClientSettings>
                            </telerik:RadGrid>
                        </div>
                    </asp:Panel>
                </asp:Panel>
            </td>
        </tr>
    </table>
    
    <telerik:RadWindowManager ID="RadWindowManager1" VisibleStatusbar="false" ReloadOnShow="true"
        runat="server" AutoSize="true" Skin="Web20" Behaviors="Close">
        <Windows>
            <telerik:RadWindow Title="รายงาน"
                runat="server" ID="RadWindowReport"
                AutoSize="true" ReloadOnShow="True">
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>
</asp:Content>
